
Pod::Spec.new do |s|
    # ------------------ 组件基本信息段---------------------
    s.name             = 'SWWeexKit'
    s.version          = '0.0.7'
    s.summary          = 'A short description of SWWeexKit.'
    s.description      = <<-DESC
                            sweet框架库体系weex基础库，提供weex运行容器、通讯、插件管理、等
                        DESC
    s.ios.deployment_target = '9.0'

    # 1. Dynamic 动态库、2. Static  静态库、3. Library 三方库封装，如HPR，OpenSSL
#    library_type       = "Dynamic"
    s.static_framework = true
    
    s.author           = { '朱帅帅' => 'shuaishuai.zhu@geely.com' }
#    s.homepage         = 'http://git.evun.cn/ADMP-repository/Sweet-iOS-SWWeexKit'
    s.homepage         = 'https://gitlab.geely.com/p-admp/ios-common-kit/ios-SWWeexKit'

    s.license          = { :type => 'MIT', :file => 'LICENSE' }
    
    if ENV['mode'].to_s.include? "lib"
        #使用zip成果物模式
        puts "SWWeexKit成果物模式集成".blue
        s.source           = { :http => 'https://geely-admp-oss.oss-cn-hangzhou.aliyuncs.com/sweet-app-release/ios/SWWeexKit.framework-0.0.7.zip' }
        s.ios.vendored_framework   = 'SWWeexKit.framework'
        s.source_files = 'SWWeexKit.framework/**/*.h'
        s.public_header_files = 'SWWeexKit.framework/**/*.h'
 
    else
        #目前默认源码集成
        puts "SWWeexKit源码模式集成".yellow
        s.source           = { :git => 'https://devops.geely.com/Products/AGP/_git/sweet-ios-weex-kit', :tag => s.version.to_s }


            # ------------------ 组件资源---------------------
        s.source_files = 'SWWeexKit/Classes/**/*.{h,m}'
        s.public_header_files  = 'SWWeexKit/Classes/**/*.h'

        s.ios.resource = [
                'SWWeexKit/Assets/files/**/*.{png,xib,storyboard}',
                'SWWeexKit/Assets/bundles/*.{bundle,xcassets}',
                'SWWeexKit/Classes/**/*.{png,xib,storyboard}'
        ]

    end
    s.ios.frameworks = 'UIKit','Foundation'
    # ------------------ 组件依赖---------------------

    s.dependency 'WeexSDK'
    s.dependency 'SWUIKit'
    s.dependency 'SWFramework'
    s.dependency 'SDWebImage'

   
   #------------------ 组件info配置 --------------------------
   s.pod_target_xcconfig  = {

       'OTHER_LDFLAGS'                 => '$(inherited) -ObjC',
       'STRINGS_FILE_OUTPUT_ENCODING'  => 'UTF-8',
       'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES',
       'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64'
   }
   s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
   
   
end
